{% extends "base/nav.html" %}

{% block title %}删除评论 - 设计作品平台{% endblock %}

{% block content %}
<div class="container mt-4">
    <div class="row justify-content-center">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header bg-danger text-white">
                    <h4 class="mb-0">
                        <i class="fas fa-trash"></i> 删除评论
                    </h4>
                </div>
                <div class="card-body">
                    <p class="alert alert-warning">
                        <strong>警告：</strong>您确定要删除这条评论吗？
                    </p>
                    
                    <div class="card mb-3">
                        <div class="card-body">
                            <strong>{{ object.author.username }}</strong>
                            <small class="text-muted"> · {{ object.created_at|timesince }}前</small>
                            <p class="mt-2 mb-0">{{ object.content }}</p>
                        </div>
                    </div>

                    <form method="post">
                        {% csrf_token %}
                        <div class="d-grid gap-2 d-md-flex justify-content-md-end">
                            <a href="{% url 'main:attraction_detail' object.attraction.pk %}" class="btn btn-secondary me-md-2">
                                <i class="fas fa-times"></i> 取消
                            </a>
                            <button type="submit" class="btn btn-danger">
                                <i class="fas fa-trash"></i> 确认删除
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}